<%@page contentType="text/html; charset=UTF-8" %>
<html>
    <head>

        <meta charset="UTF-8">
        <link rel="stylesheet" href="../css/login.css"/>
        <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.css">
        <style type="text/css">

    
            body {
  background-color: #f0ece9;
}

header {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
}
header h1 {
  color: #9a9897;
}

header hr {
  margin: 20px 20px 0;
  background-color: #bc9470;
  border: 2px solid #bc9470;
  width: 30%;
  height: 0;
}
            span
                {
                    float: left;
                    margin-left: 50px;
                    margin-top: 50px;
                    width: 220px;
                    height: 480px;
                    border: 3px solid #e9e5e3;;
                }
            a:link
                {
                    color:black;
                    font-size: 30px;
                    font-family: Arial;
                }
            a:hover
                {
                    color: red;
                }
            a
                {
                    margin-left: 20px;
                }
            .first
                {
                    width: 1200px;
                    height: 550px;
                    border: 1.5px solid #b4aea9;
                    margin-left: 300px;
                    margin-top: 34px;
                    padding-left: 20px;
                }
            p
                {
                    color: navy;
                    font-size: 25px;
                    font-family: Arial;
                }

                #login-box{
    width:30%;
    height:auto;
    margin:0 auto ;
    margin-top:1%;
    text-align:center;
    background:#e4e0dd;
    padding:90px 380px;
    }
#login-box h1{
    color:#fff;
}
#login-box .form .item{
    margin-top:10px;
}
#login-box .form .item i{
    font-size:200px;
    color:#fff;
}
#login-box .form .item input{
    width:200px;
    font-size:18px;
    border:0;
    border-bottom:2px solid #fff;
    padding:5px 10px;
    background:#b6b3b0;
    color:#fff;
}
#login-box 	button{
    margin-top:20px;
    width:190px;
    height:40px;
    font-size:15px;
    font-weight:60;
    color:#fff;
    background-image: linear-gradient(to right, #e2c27e 0%, #7e6548 100%);
    border:0;
    border-radius:25px;
}
        </style>

        
    <meta charset="UTF-8">  
    <title>password</title> 
    <link rel="stylesheet" type="text/css" href="Login.css"/>   
    <script>
                  var reg_password = /^\w{5,10}$/;
                  var reg_username = /^\w{2,10}$/;
        function R(){
            
            var Uname=document.getElementById("username").value;
            var Upassword=document.getElementById("password").value;
   
            if(Uname =="")
            {
             alert("请输入用户名");
              return false;
           }
           else if(Upassword =="")
          {
             alert("请输入密码");
             return  false;
           }
            else if (!reg_username.test(Uname)) {
                alert("用户名请输入2-10位字符");
                return  false;
            }else if(!reg_password.test(Upassword)){
                alert("密码请输入5-10个字符");
                return  false;
            }
          else{
                alert("更改成功");
               
            }

        }
    </script>
    </head>
    <body>
        <header>
            <hr/>
        <h1>订单信息管理系统</h1>
            <hr/>
        </header>
        <div>

            <span>
                <br><br><a href="manage9.jsp">订单管理</a><br><br><br>
                <a href="input9.jsp">订单信息录入</a><br><br><br>
                <a href="password9.jsp">账号信息修改</a><br><br><br>
                <a href="history9.jsp">历史订单</a><br><br><br>
                <a href="login9.jsp">退出登录</a><br>
            </span>
        </div>
        <div class="first">
            <header>
                <hr/>
          
                <h3 align="center" style="color: #9a9897;">账号信息修改</h3>
                <hr/>
            </header><br><br>
            <div align="center">
                <form class="form-signin"   method="post" onsubmit="return R()" action="login9.jsp" >
                    <div id="login-box">
                     
                        <div class="form">
                            <div class="item">
                                <i class="fa fa-github-alt" style="font-size:24px"></i>
                      
                        <input type="text"  name="user" id="username"  placeholder="请输入用户名"><br><br>
                           
                              </div>
                              <div class="item">
                                <i class="fa fa-search" style="font-size:24px"></i>
                        <input type="password" name="psw" id="password" placeholder="请更改新密码"><br><br>
                        </div>
                        <button class="btn btn-lg btn-primary btn-block" type="submit" onclick=" return R()">确定</button><br>
                        
                   
                    </div>
                        
                  
            
            </form>
            </div>

    </body>
</html>